home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacPerl 5.0.3 / MacPerl Source ƒ / Perl5 / x2p / handy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-26  |  843 b   |  35 lines  |  [TEXT/MPS ]

  1. /* $RCSfile: handy.h,v $$Revision: 4.1 $$Date: 92/08/07 18:29:19 $
  2.  *
  3.  *    Copyright (c) 1991, Larry Wall
  4.  *
  5.  *    You may distribute under the terms of either the GNU General Public
  6.  *    License or the Artistic License, as specified in the README file.
  7.  *
  8.  * $Log:    handy.h,v $
  9.  */
  10.  
  11. #define Null(type) ((type)0)
  12. #define Nullch Null(char*)
  13. #define Nullfp Null(FILE*)
  14.  
  15. #define bool char
  16. #ifdef TRUE
  17. #undef TRUE
  18. #endif
  19. #ifdef FALSE
  20. #undef FALSE
  21. #endif
  22. #define TRUE (1)
  23. #define FALSE (0)
  24.  
  25. #define Ctl(ch) (ch & 037)
  26.  
  27. #define strNE(s1,s2) (strcmp(s1,s2))
  28. #define strEQ(s1,s2) (!strcmp(s1,s2))
  29. #define strLT(s1,s2) (strcmp(s1,s2) < 0)
  30. #define strLE(s1,s2) (strcmp(s1,s2) <= 0)
  31. #define strGT(s1,s2) (strcmp(s1,s2) > 0)
  32. #define strGE(s1,s2) (strcmp(s1,s2) >= 0)
  33. #define strnNE(s1,s2,l) (strncmp(s1,s2,l))
  34. #define strnEQ(s1,s2,l) (!strncmp(s1,s2,l))
  35.